package com.jspgou.cms.entity.base;

import java.io.Serializable;


/**
 * This is an object that contains data related to the jc_shop_yushou table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="jc_shop_yushou"
 */

public abstract class BaseShopYushou  implements Serializable {

	public static String REF = "shopYushou";
	public static String PROP_CODE="code";
	public static String PROP_USER = "user";
	public static String PROP_PRODUCTID = "productid";
	public static String PROP_PAY = "pay";
	public static String PROP_YSTATUS = "ystatus";
	public static String PROP_ADDRESS = "address";
	public static String PROP_ID = "id";
	public static String PROP_CREATEDATE = "createdate";
	public static String PROP_FREIGHT = "freight";
	public static String PROP_WEIGHT = "weight";


	// constructors
	public BaseShopYushou () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BaseShopYushou (java.lang.Long id) {
		this.setId(id);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private java.lang.Long id;

	// fields
	private java.lang.String code;
	private java.lang.Short ystatus;
	private java.util.Date createdate;
	private java.lang.Long count;
	private java.lang.Double amount;

	// many to one
	private com.jspgou.cms.entity.Product productid;
	private com.jspgou.cms.entity.ShopMemberAddress address;
	private com.jspgou.cms.entity.ShopMember user;
	private com.jspgou.cms.entity.Payment pay;
	private com.jspgou.cms.entity.Shipping shipid;
	private java.lang.Double freight;
	private java.lang.Double weight;



	public java.lang.Double getFreight() {
		return freight;
	}

	public void setFreight(java.lang.Double freight) {
		this.freight = freight;
	}

	public java.lang.Double getWeight() {
		return weight;
	}

	public void setWeight(java.lang.Double weight) {
		this.weight = weight;
	}

	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="identity"
     *  column="Id"
     */
	public java.lang.Long getId () {
		return id;
	}

	/**
	 * Set the unique identifier of this class
	 * @param id the new ID
	 */
	public void setId (java.lang.Long id) {
		this.id = id;
		this.hashCode = Integer.MIN_VALUE;
	}

	public java.lang.String getCode(){
		return code;
	}
	
	public void setCode(java.lang.String code){
		this.code=code;
	}

	/**
	 * Return the value associated with the column: ystatus
	 */
	
	
	
	

	public java.lang.Double getAmount() {
		return amount;
	}

	

	public void setAmount(java.lang.Double amount) {
		this.amount = amount;
	}

	public com.jspgou.cms.entity.Shipping getShipid() {
		return shipid;
	}

	public void setShipid(com.jspgou.cms.entity.Shipping shipid) {
		this.shipid = shipid;
	}

	/**
	 * Set the value related to the column: ystatus
	 * @param ystatus the ystatus value
	 */
	public java.lang.Short getYstatus() {
		return ystatus;
	}
	public void setYstatus (java.lang.Short ystatus) {
		this.ystatus = ystatus;
	}


	
	
	public java.lang.Long getCount() {
		return count;
	}

	public void setCount(java.lang.Long count) {
		this.count = count;
	}

	/**
	 * Return the value associated with the column: createdate
	 */
	public java.util.Date getCreatedate () {
		return createdate;
	}

	/**
	 * Set the value related to the column: createdate
	 * @param createdate the createdate value
	 */
	public void setCreatedate (java.util.Date createdate) {
		this.createdate = createdate;
	}


	/**
	 * Return the value associated with the column: productid
	 */
	public com.jspgou.cms.entity.Product getProductid () {
		return productid;
	}

	/**
	 * Set the value related to the column: productid
	 * @param productid the productid value
	 */
	public void setProductid (com.jspgou.cms.entity.Product productid) {
		this.productid = productid;
	}


	/**
	 * Return the value associated with the column: address
	 */
	public com.jspgou.cms.entity.ShopMemberAddress getAddress () {
		return address;
	}

	/**
	 * Set the value related to the column: address
	 * @param address the address value
	 */
	public void setAddress (com.jspgou.cms.entity.ShopMemberAddress address) {
		this.address = address;
	}


	/**
	 * Return the value associated with the column: userId
	 */
	public com.jspgou.cms.entity.ShopMember getUser () {
		return user;
	}

	/**
	 * Set the value related to the column: userId
	 * @param user the userId value
	 */
	public void setUser (com.jspgou.cms.entity.ShopMember user) {
		this.user = user;
	}


	/**
	 * Return the value associated with the column: pay
	 */
	public com.jspgou.cms.entity.Payment getPay () {
		return pay;
	}

	/**
	 * Set the value related to the column: pay
	 * @param pay the pay value
	 */
	public void setPay (com.jspgou.cms.entity.Payment pay) {
		this.pay = pay;
	}



	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof com.jspgou.cms.entity.ShopYushou)) return false;
		else {
			com.jspgou.cms.entity.ShopYushou shopYushou = (com.jspgou.cms.entity.ShopYushou) obj;
			if (null == this.getId() || null == shopYushou.getId()) return false;
			else return (this.getId().equals(shopYushou.getId()));
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getId()) return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getId().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}


}